<style>
#BrandsAdmin form{
	margin:0px;
	padding:0px;
}
#BrandsAdmin h2{
	margin:0px;
	padding:0px;
}
#BrandsAdmin .area{
	margin-top:2px;
}
#BrandsAdmin .info{
	float:left;
	display:block;
	margin:75px 0px 0px 200px;
}
#BrandsAdminResults{
	width:500px;
}
#BrandsAdminResults tr:hover{
	background:{{$highlight}};
	color:{{$highlighttext}};
}
#BrandsAdminResults tr td input[type=submit],
#BrandsAdminResults tr td input[type=button]{
	background-color:transparent;
	background-position:center center;
	border:none;
	margin:0px 2px;
	padding:0px;
	float:none;
	width:16px;
	height:16px;
	cursor:pointer;
}
#BrandsAdminResults tr:hover td input[type=submit],
#BrandsAdminResults tr:hover td input[type=button]{
	background-color:#fff;
}
#BrandsAdminResults tr td input[type=text]{
	margin:0px 1px;
	padding:0px 1px;
	float:none;
}
#BrandsAdminResults tr td label{
	float:none;
	padding:0px;
	margin:0px;
	display:inline;
}
#BrandsAdminEdit{
	display:none;
}
</style>
<div id="BrandsAdmin">
	<div class="area">
		<h2>Brendovi</h2>
		<form action="javascript:void(0)" onSubmit="submitForm(this,'brands.php','POST','setContent',1)">
			<label for="kword" class="left">brend:</label>
			<input type="text" name="kword" id="kword" value="{{$kword}}" />
			<input type="submit" value="filter" />
		</form>
	</div>
	<span class="info">{{$info}}</span>
	<br clear="all" />
	<div class="area" id="BrandsAdminResults">
		<ul class="letter_filter" kword="{{$kword}}" id="PageFilter">
			<li><strong style="width:auto;">Strana:</strong></li>
			{{%loop start page}}
			<li><a id="{{$page_current}}" href="javascript:void(0)" onClick="var kw=trim(this.parentNode.parentNode.getAttribute('kword')); LoadRSDoc('brands.php?page={{$page}}&kword='+kw,'setContent')">{{$page}}</a></li>
			{{%loop end}}
		</ul><br clear="all" />
		<hr />
		
		<table width="100%">
			<tr class="head" align="center">
				<td>šifra</td>
				<td>naziv</td>
				<td><input type="button" class="novi" onclick="var ime=prompt('Naziv brenda:'); LoadRSDoc('brands.php?a=new&name='+escape(ime),'afterEditBrand')" title="novi brend" /></td>
			</tr>
			{{$comment_start}}
			{{%loop start brand_id}}
			<tr>
				<td align="right" width="10%">{{$brand_id}}</td>
				<td>{{$brand_name}}</td>
				<td width="10%">
					<input type="button" id="edit{{$brand_id}}" class="edit" title="izmeni" onclick="var bn=escape('{{$brand_name_enc}}'); EditBrand(this,'{{$brand_id}}',bn)" />
					<input type="button" class="delete" title="obriši" onclick="var bn=escape('{{$brand_name_enc}}'); DeleteBrand('{{$brand_id}}',bn)" />
				</td>
			</tr>
			{{%loop end}}
			{{$comment_end}}
		</table>
		
	</div>
	<form action="javascript:void(0)" onSubmit="submitForm(this,'brands.php','POST','afterEditBrand',1)" id="BrandsAdminEdit">
		<input type="hidden" name="a" value="save" />
		<input type="hidden" name="edit_brand_id" id="edit_brand_id" value="" />
		<input type="text" name="edit_brand_name" id="edit_brand_name" value="" />
		<input type="submit" value="" class="save" />
	</form>
</div>